//Source file: D:\\test\\com\\ce\\pms\\charge\\model\\ChargeDatasDomain.java

package com.ce.pms.charge.model;

import java.beans.FeatureDescriptor;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ce.pms.common.model.SysInfo;
import com.ce.pms.customer.model.ProRightDO;
import com.ce.pms.house.model.HouseDomain;
import com.ce.pms.house.model.MeterDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:走表数据 关联数据表表:FEE_CHARGE_DATAS
 *    功能:记录系统录入的走表原始数据
 *         关联表: 收费项目表,收费周期,房屋表
 * @author Adama Yue
 * @CreateDate:2008-7-14
 */
@Entity
@Table(name="FEE_CHARGE_DATAS")
public class ChargeDatasDomain implements IDomainObject{

	/**
	 * 主键
	 */
	@Id @GeneratedValue @Column(name="CHARGE_DATA_ID")
	private Long chargeDataId;

	/**
	 * 房屋
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="HOUSE_ID",nullable=false)
	private HouseDomain house;

	/**
	 * 产权
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="PRO_RIGHT_ID",nullable=false)
	private ProRightDO proRight;

	/**
	 * 业主(所有)姓名
	 */
	@Column(name="CUST_NAME",length=100)
	private String owners;

	/**
	 * 收费周期
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="PERIOD_ID")
	private PeriodDomain period;

	/**
	 * 房屋走表
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="METER_ID")
	private MeterDomain meter;

	/**
	 * 数据状态:001新建;002已计算;003修改作废;004调整作废
	 */
	@Column(name="STATUZ",nullable=false,length=3)
	private String statuz;

	/**
	 * 上次读数
	 */
	@Column(name="LAST_READING",precision=13,scale=2)
	private BigDecimal lastReading=new BigDecimal("0.00");

	/**
	 * 本次读数
	 */
	@Column(name="THIS_READING",precision=13,scale=2)
	private BigDecimal thisReading=new BigDecimal("0.00");

	/**
	 * 用量
	 */
	@Column(name="WASTAGE",precision=13,scale=2)
	private BigDecimal wastage=new BigDecimal("0.00");

	/**
	 * 抄表日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name="RECORD_TIME")
	private Date recordTime;

	/**
	 * 备注
	 */
	@Column(name="REMARK",length=500)
	private String remark;



	@Embedded
	private SysInfo sysInfo;

	/**
	 * @roseuid 48757D110196
	 */
	public ChargeDatasDomain() {

	}
	/**
	 * mini constructor
	 * @param house    房屋
	 * @param proRight 产权
	 * @param statuz   数据状态
	 * @param sysInfo  系统信息
	 */
	public ChargeDatasDomain(HouseDomain house, ProRightDO proRight, String statuz, SysInfo sysInfo) {
		this.house = house;
		this.proRight = proRight;
		this.statuz = statuz;
		this.sysInfo = sysInfo;
	}

	public Long getChargeDataId() {
		return chargeDataId;
	}
	public void setChargeDataId(Long chargeDataId) {
		this.chargeDataId = chargeDataId;
	}
	public HouseDomain getHouse() {
		return house;
	}
	public void setHouse(HouseDomain house) {
		this.house = house;
	}
	public BigDecimal getLastReading() {
		return lastReading;
	}
	public void setLastReading(BigDecimal lastReading) {
		this.lastReading = lastReading;
	}
	public MeterDomain getMeter() {
		return meter;
	}
	public void setMeter(MeterDomain meter) {
		this.meter = meter;
	}
	public String getOwners() {
		return owners;
	}
	public void setOwners(String owners) {
		this.owners = owners;
	}
	public PeriodDomain getPeriod() {
		return period;
	}
	public void setPeriod(PeriodDomain period) {
		this.period = period;
	}
	public ProRightDO getProRight() {
		return proRight;
	}
	public void setProRight(ProRightDO proRight) {
		this.proRight = proRight;
	}
	public Date getRecordTime() {
		return recordTime;
	}
	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getStatuz() {
		return statuz;
	}
	public void setStatuz(String statuz) {
		this.statuz = statuz;
	}
	public SysInfo getSysInfo() {
		return sysInfo;
	}
	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}
	public BigDecimal getThisReading() {
		return thisReading;
	}
	public void setThisReading(BigDecimal thisReading) {
		this.thisReading = thisReading;
	}
	public BigDecimal getWastage() {
		return wastage;
	}
	public void setWastage(BigDecimal wastage) {
		this.wastage = wastage;
	}

}
